// BWUtilities.h - grab bag of random stuff

#import <Cocoa/Cocoa.h>

// Given two rectangles, center one inside of the other

NSRect BWCenterRectInRect (NSRect smallRect, NSRect bigRect);


// take one rectangle and scale it proportionally until it fits
// into another

NSRect BWFitRectInto (NSRect inner, NSRect outer);


FOUNDATION_STATIC_INLINE int BWMin3 (int x, int y, int z)
{
    int ack;
    ack = MIN (x, y);
    ack = MIN (ack, z);

    return (ack);

} // BWMin3


FOUNDATION_STATIC_INLINE int BWMax3 (int x, int y, int z)
{
    int ack;
    ack = MAX (x, y);
    ack = MAX (ack, z);

    return (ack);

} // BWMax3
